<template>
	<view>
		<u-mask :show="maskShow"  :custom-style="{background: 'rgba(255, 255, 255, 0.1)'}">
				<view class="warp">
					<u-image :width="width" :height="height" 
							 :src="startUp" :fade="true" duration="450">
					</u-image>
				</view>
		</u-mask>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				startUp: '../../static/startUp.jpg',
				width:0,
				height:0,
				maskShow:true,
				useCount:0,
			};
		},

		created:function(){
			this.height=this.$u.sys().windowHeight*2;
			this.width=this.$u.sys().windowWidth*2;
		},

		onLoad() {
			setTimeout(() => {
				this.loginByLocalStrorge();
			}, 1500)
		},
		
		
		methods:{
			async loginByLocalStrorge () {
				if (this.vuex_token) {
          this.$u.route({
            type:'reLaunch',
            url:"/pages/chat/chatGroupList",
          })
				} else {
					console.log("缓存中没有登录信息");
					this.$u.route({
						type:'reLaunch',
						//url:"/pages/index/login",
						url:"/pages/start/wx-login",
						params: {}
					})
				}
			},
			
		}
	}
</script>



<style lang="scss" scoped>
		.warp {
			display: flex;
			align-items: center;
			justify-content: center;
			height: 100%;
			width: 100%;
		}
</style>

